<?php


namespace app\common\model;


class Favorites extends BaseModel
{
    protected $table = 'fa_favorites';

    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = false;


    public function demand()
    {
        return $this->belongsTo(Demand::class,'collect_id');
    }

    public function goods()
    {
        return $this->belongsTo(Goods::class,'collect_id');
    }

}